package me.pplay.playtalk.util;

import me.pplay.playtalk.protocol.bean.TPBuddyinfo;

public class BuddyInfoUtil {
	public static String getAlias(TPBuddyinfo buddyinfo){
		if(buddyinfo == null)
			return "";
		if (buddyinfo.getServer_alias().length() > 0)
			return buddyinfo.getServer_alias();
		else if (buddyinfo.getAlias().length() > 0)
			return buddyinfo.getAlias();
		else if (buddyinfo.getName().length() > 0)
			return	buddyinfo.getName();
		else
			return buddyinfo.getSkyid() + "";
	}

}
